Problem Note 40439: The SASDATEFMT= option does not convert the data type if the Oracle data type is TIMESTAMP
The SASDATEFMT= option converts database management system (DBMS) data types to SAS DATE, TIME, or DATETIME data types. The DBSASTYPE= option also converts DBMS data types, not only to DATE, TIME, or DATETIME types, but also to CHAR and NUMERIC types.
Because the DBSASTYPE= option does the same as and more than the SASDATEFMT= option, it is expected that the SASDATEFMT= option will be phased out in a future release. As a result, support for the Oracle TIMESTAMP data type has not been included for the SASDATEFMT= option. If you attempt to use the SASDATEFMT= option with the TIMESTAMP data type, the option is ignored and no change occurs in the value, as shown in the following example:
libname ora oracle user=oracle-user password=oracle-password path=oracle-path;
proc sql noprint;
create table work.sastabble
as select *
from ora.oratable (sasdatefmt=(c1='date9.'));
quit;
When this code is submitted, the column C1 is not converted to the DATE9. format, and no warning is generated.
To avoid this issue, use the DBSASTYPE= option instead of the SASDATEFMT= option as shown in this example.
libname ors oracle user=oracle-user password=oracle-password path=oracle-path;
proc sql noprint;
create table work.sastabble
as select *
from ors.oratable (dbsastype=(c1='date9.'));
quit;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Oracle | Tru64 UNIX | 9.1 TS1M3 | 9.3 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 | 9.3 TS1M0 |
Linux | 9.1 TS1M3 | 9.3 TS1M0 |
HP-UX IPF | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.3 TS1M0 |
Windows Vista for x64 | 9.1 TS1M3 | 9.3 TS1M0 |
Windows Vista | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.3 TS1M0 |
z/OS | 9.1 TS1M3 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When you use the SASDATEFMT= option to change the datetime value to a date value, the option is ignored if the Oracle data type is TIMESTAMP. That is, there is no change to the value. To avoid this problem, use the DBSASTYPE= option.
Type: | Problem Note |
Priority: | high |
Topic: | Data Management ==> Data Sources ==> External Databases ==> Oracle
|
Date Modified: | 2015-08-18 10:45:13 |
Date Created: | 2010-07-24 16:05:49 |